using UnityEngine;
using System.Collections;

public class Vars : MonoBehaviour
{
	
	public static bool isLeft;
	public static bool isRight;
	public static bool isUp;
	public static bool isDown;
	
	public static bool alive;
	public static bool falling;
	
	public static int facingDir = 1; // 1 = left, 2 = right, 3 = up, 4 = down
	public enum anim { None, WalkLeft, WalkRight, StandLeft, StandRight}	
	
	// Use this for initialization
	void Start ()
	{
	
	}
	
	// Update is called once per frame
	void Update ()
	{
	
	    // these are false unless one of keys is pressed
		isLeft = false;
		isRight = false;
		isUp = false;
		isDown = false;

		// keyboard input
		if(Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.LeftArrow)) 
		{ isLeft = true; }
		if (Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode.RightArrow)) 
		{ isRight = true; }

		if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.UpArrow)) 
		{ isUp = true; }
		if (Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.DownArrow)) 
		{ isDown = true; }

		//if (Input.GetKey(KeyCode.Space) || Input.GetKey(KeyCode.E)) 
		//{ isShoot = true; }
		//}		
		
	}
}

